#include <iostream>
#include <vector>
using namespace std;

int main()
{
    int n;
    cin >> n;
    vector<int> fish(n+1);
    for (int i=1; i<=n; ++i)
    {
        int tmp;
        cin >> tmp;
        fish[i] = tmp;
    }
    vector<int> cnt(n+1, 0);
    for (int i=1; i<=n; ++i)
    {
        for (int j=1; j<i; ++j)
        {
            if (fish[j] < fish[i]) ++cnt[i];
        }
    }
    for (int i=1; i<=n-1; ++i)
    {
        cout << cnt[i] << " ";
    }
    cout << cnt[n];
    return 0;
}
